package client.demo;

import bean.DemoProtocol;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

import java.util.Date;

/**
 * 客户端的处理类比较简单，只需要将读到的信息打印出来即可
 */
public class SimpleChatClientHandler extends SimpleChannelInboundHandler<DemoProtocol> {
    @Override
    protected void channelRead0(ChannelHandlerContext ctx, DemoProtocol s) throws Exception {
        //Ecg.EcgResult e = (Ecg.EcgResult) s;
        System.out.println(new Date().getTime() + "  接收  ========>   ");
    }

    //@Override
    //protected void messageReceived(ChannelHandlerContext channelHandlerContext, String s) throws Exception {
    //    System.out.println(s);
    //}
}
